24. Applications of Taylor Series

d.2. Fundamental Constants

When the sum of a series is a fundamental constant, it is often a good way to compute an approximation to the constant. This occurs several times on the previous page for the constants \(e\), \(\pi\) and \(\ln 2\).

Use the series \(\displaystyle e=\sum_{n=0}^\infty \dfrac{1}{n!}\) to approximate \(e\) up to \(7\) decimal places.

Here is a table of partial sums: \[\begin{aligned} k &\qquad \sum_{n=0}^k \dfrac{1}{n!} & \\ 0 &\qquad 1 &&=1 \\ 1 &\qquad 1+1 &&=2 \\ 2 &\qquad 1+1+\dfrac{1}{2} &&=2.5 \\ 3 &\qquad 1+1+\dfrac{1}{2}+\dfrac{1}{6} &&\approx 2.666\,667\\ 4 &\qquad 1+1+\dfrac{1}{2}+\dfrac{1}{6}+\dfrac{1}{24} &&\approx 2.708\,333 \\ 5 &\qquad 1+1+\dfrac{1}{2}+\dfrac{1}{6}+\dfrac{1}{24}+\dfrac{1}{120} &&\approx 2.716\,667 \\ 6 &\qquad 1+1+\dfrac{1}{2}+\dfrac{1}{6}+\dfrac{1}{24}+\dfrac{1}{120}+\dfrac{1}{720} &&\approx 2.718\,055 \\ 7 &\qquad 1+1+\dfrac{1}{2}+\dfrac{1}{6}+\dfrac{1}{24}+\dfrac{1}{120}+\dfrac{1}{720}+\dfrac{1}{5040} &&\approx 2.718\,253 \\ 10 &\qquad \sum_{n=0}^{10} \dfrac{1}{n!} &&\approx 2.718\,281\,801\,146\,38 \end{aligned}\] So with only \(10\) terms, we get \(e\approx2.718\,281\,828\) to \(8\) digits.

Use the series \(\displaystyle \pi=\sum_{n=0}^\infty \dfrac{(-1)^n4}{(2n+1)}\) to approximate \(\pi\) up to \(4\) decimal places.

Here is a table of partial sums: \[\begin{aligned} k &\qquad \sum_{n=0}^k \dfrac{(-1)^n4}{(2n+1)} & \\ 0 &\qquad 4 &&=4 \\ 1 &\qquad 4-\dfrac{4}{3} &&\approx 2.666\,667 \\[5pt] 2 &\qquad 4-\dfrac{4}{3}+\dfrac{4}{5} &&\approx 3.466\,667 \\[5pt] 3 &\qquad 4-\dfrac{4}{3}+\dfrac{4}{5}-\dfrac{4}{7} &&\approx 2.895\,238 \\ 10 &\qquad \sum_{n=0}^{10} \dfrac{(-1)^n4}{(2n+1)} &&\approx 3.232\,315 \\ 11 &\qquad \sum_{n=0}^{11} \dfrac{(-1)^n4}{(2n+1)} &&\approx 3.058\,402 \\ 100 &\qquad \sum_{n=0}^{100} \dfrac{(-1)^n4}{(2n+1)} &&\approx 3.151\,493 \\ 101 &\qquad \sum_{n=0}^{101} \dfrac{(-1)^n4}{(2n+1)} &&\approx 3.131\,788 \\ 1000 &\qquad \sum_{n=0}^{1000} \dfrac{(-1)^n4}{(2n+1)} &&\approx 3.142\,591 \\ 1001 &\qquad \sum_{n=0}^{1001} \dfrac{(-1)^n4}{(2n+1)} &&\approx 3.140\,594 \end{aligned}\] The partial sums to this point only give \(\pi\approx3.14159\) to \(2\) decimal places. Specifically, since this is an alternating series, the estimate is accurate to within the next term, which is \[ |E_{1001}| \lt \pm \dfrac{4}{(2\cdot1002+1)}\approx2\times10^{-3}\approx.002 \] However, since this is an alternating series, the even partial sums are upper bounds and the odd partial sums are lower bounds. Averaging the last two partial sums, we find \(\pi\approx3.141\,59\) which is \(\pi\) to 5 decimal places. This estimate is accurate to half the difference between the last two partial sums: \[ |\bar E_{1001}| \lt \pm \dfrac{3.140\,594-3.142\,591}{2}\approx2\times10^{-6}\approx.000\,002 \]

Notice that the series for \(\pi\) converges much more slowly than the series for \(e\) because it does not have a factorial in the denominator.

Obviously, you would not like to do these computations without the help of a computer.

Use the series \(\displaystyle \cos(x)=\sum_{k=0}^\infty \dfrac{(-1)^k}{(2k)!}x^{2k}\) to approximate \(\cos(0.1)\) up to \(5\) decimal places.

Since it is an alternating series, the error is less than the first term ignored.

\(\cos(0.1)\approx1-\dfrac{(.1)^2}{2!}=.99500\) is accurate to within \(10^{-5}\).

We need to approximate the series: \(\displaystyle \cos(0.1)=\sum_{k=0}^\infty \dfrac{(-1)^k}{(2k)!}(0.1)^{2k}\) Since this is alternating, the error is the first term ignored. We write out some terms: \[ \cos(0.1)=1-\dfrac{(.1)^2}{2!}+\dfrac{(.1)^4}{4!}-\cdots \] Since \(\dfrac{(.1)^4}{4!}=\dfrac{1}{24}\times10^{-4}\approx4\times10^{-6}\), the approximation: \[ \cos(0.1)\approx1-\dfrac{(.1)^2}{2!}=.99500 \] is accurate to within \(10^{-5}\).

© MYMathApps

Supported in part by NSF Grant #1123255